﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DataTransfer;
namespace Gui
{
    public partial class frmMain : DevComponents.DotNetBar.Office2007RibbonForm
    {
        Form frm = new frmDangNhap();
        public static User currentUser = new User();
        public frmMain(Form newform = null)
        {
            InitializeComponent();
            currentUser.UserName = "admin";
            if (newform != null)
            {
                Close();
                frm = newform;
                frm.MdiParent = this;
                frm.WindowState = FormWindowState.Maximized;
                frm.Show();
            }
        }

        private void btnDanhSachKhamBenh_Click(object sender, EventArgs e)
        {
            Close();
            frm = new frmDanhSachKhamBenh(this);
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }

        private void btnTimKiem_Click(object sender, EventArgs e)
        {
            frm = new frmTimKiem();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void btnDanhSachNhanVien_Click(object sender, EventArgs e)
        {
            Close();
            frm = new frmDanhSachNhanVien();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }






        private void btnXuatThuoc_Click(object sender, EventArgs e)
        {
            Close();
            frm = new frmXuatThuoc();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void btnThongKeThuoc_Click(object sender, EventArgs e)
        {
            Close();
            frm = new frmThongKeThuoc();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void btnDoanhThu_Click(object sender, EventArgs e)
        {
            frm = new frmDoanhThu();
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

        private void btnGioiThieu_Click(object sender, EventArgs e)
        {
            //Form frm = new ();
            //frm.MdiParent = this;
            //frm.WindowState = FormWindowState.Maximized;
            //frm.Show();
        }

        private void btnCapNhap_Click(object sender, EventArgs e)
        {

        }

        private void btnBaoLoi_Click(object sender, EventArgs e)
        {

        }
        public void LapPhieuKhamBenh(DSKB info)
        {
            Close();
            frm = new frmLapPhieuKhamBenh(info);
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }
        public void LapHoaDon(BenhNhan info)
        {
            Close();
            frm = new frmLapHoaDon(info, this);
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();

        }
        private void Close()
        {
            frm.Close();
        }

        private void btnDanhSachBenhNhan_Click(object sender, EventArgs e)
        {
            Close();
            frm = new frmDanhSachBenhNhan(this);
            frm.MdiParent = this;
            frm.WindowState = FormWindowState.Maximized;
            frm.Show();
        }

       
    }
}
